/**
 * Created by MDURAND on 26/11/2014.
 */

helloseriesApp.factory('PopupService', ['ngDialog',
    function (ngDialog){

        var popupService = {};

        popupService.showPopupSeriesATelecharger = function ($scope) {
            ngDialog.open({
                template: "popups/popupSeriesATelecharger.html",
                className: 'ngdialog-theme-default',
                scope: $scope
            });
        };

        popupService.showPopupAucuneSerieATelecharger = function () {
            ngDialog.open({
                template: "popups/popupAucuneSerieATelecharger.html",
                className: 'ngdialog-theme-default'
            });
        };

        popupService.showPopupConfirmEnregistrement = function ($scope) {
            ngDialog.open({
                template: "popups/popupConfirmation.html",
                className: 'ngdialog-theme-default',
                scope: $scope
            });
        };

        popupService.showPopupError = function () {
            ngDialog.open({
                template: "popups/popupError.html",
                className: 'ngdialog-theme-default'
            });
        };

        popupService.closeAllPopups = function (){
            ngDialog.close();
        };

        return popupService;
    }
]);